#!/bin/bash

#default port 8000
mkdir -p /code/storage
nohup python -m http.server --directory /code/storage &

nohup python /code/main.py &
sleep 5
curl http://localhost:5000/v1/collection2/gen_hist/
curl http://localhost:5000/v1/collection2/gen_wordcloud/
echo curl first finished

for ((i=1 ; i < 10000;i++));
do 
sleep 30
curl http://localhost:5000/v1/collection2/gen_hist/
curl http://localhost:5000/v1/collection2/gen_wordcloud/
echo "curl finish with time:  $i"
done
